Method and Apparatus for Viewing Electronic Commerce-Related Documents

ABSTRACT

The present invention includes a method of providing users with formatted access to XML and similar documents received from trading partners using a general purpose viewer or browser. Particular aspects of the present invention are described in the claims, specification and drawings.

RELATED APPLICATIONS

This application is a divisional application of U.S. patent application Ser. No. 09/794,302 filed 27 Feb. 2001, which will issue on 19 Aug. 2008 as U.S. Pat. No. 7,415,669, which is incorporated herein by reference in its entirety.

BACKGROUND OF THE INVENTION

Electronic commerce between businesses has gained substantial momentum. Electronic marketplaces and XML or similar documents have begun to replace traditional EDI formats for commerce-related documents. Still, many businesses, particularly small and medium sized businesses, have not adopted automated EDI or XML transaction processing. It remains easier for large trading partners to generate XML or similar documents than it is for small to medium sized businesses to adopt the technology needed to processing them. In addition, a full scale conversion to EDI or XML transaction processing may involve far more documents than a small to medium sized business can practically convert, either within a workable timeframe or a reasonable budget.

Therefore, it is desirable to introduce methods and devices that allow users to read and understand XML and similar documents generated by their trading partners without extensive programming. It is also desirable to introduce methods and devices that are extensible, that can display in a meaningful format field types that are not referenced in output formats.

SUMMARY OF THE INVENTION

The present invention includes a method of providing users with formatted access to XML and similar documents received from trading partners using a general purpose viewer or browser. Particular aspects of the present invention are described in the claims, specification and drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a system handling documents in accordance with aspects of the present invention.

FIG. 2 is a block diagram of a document including tagged fields.

FIG. 3 illustrates participants in a marketplace.

FIG. 4 depicts assignment of a URI value to a typed variable.

FIG. 5 illustrates a user interface for requesting a view of a document.

FIG. 6 depicts assignment of a URI value to a typed variable.

FIGS. 7 and 8 are an example of a document and a transformation for display.

FIG. 9 is an overview of code used to translate XML to HTML, for the display in FIG. 8.

FIG. 10 is a variation on FIG. 8, depicting the effect of a user collapsing data.

FIG. 11 is a flow chart of HTML to HTML conversion, for the display in FIG. 10.

DETAILED DESCRIPTION

The following detailed description is made with reference to the figures. Preferred embodiments are described to illustrate the present invention, not to limit its scope, which is defined by the claims. Those of ordinary skill in the art will recognize a variety of equivalent variations on the description that follows.

FIG. 1 depicts a system 105 practicing various aspects of the present invention. Interacting with the system are an entity 100 which sends a document to the system and a user 150 who views the document stored by the system. The entity sends the document to a server 110. The document may be sent to a location at which the server acts as a router based on the addressee or the addressee and document type or it may be sent directly to a location specified for the type of document being sent. For instance, a global directory may be published that identifies locations to which participants in a marketplace desire for documents of various types to be sent. The locations may be specified in the form of market participant IDs or URLs. A market participant may have multiple IDs or URLs.

The document sent by the entity includes tagged fields. A sample document having two different types of tagged fields is illustrated in FIG. 2. The document 200 may have one or more parts 230, 240. For instance, the document may include a MIME header and an XML body. A MIME header may be compliant with RFC 822. The header 230 includes a plurality of tagged fields 231-233. The body 240 also includes a plurality of tagged fields 241-249. Alternatively, the document may have only one part or one type of tagged fields. These tagged fields may comply with a schema, such as an xCBL schema by Commerce One or a cXML schema by Ariba. A schema is characterized by tagged fields having types and super types. Types inherent properties from the supertypes on which they are based. Types are defined based on their supertypes and having additional properties. Other standards to which tagged fields may comply include SOX by Commerce One, eCX, the OAGI standard of Open Applications.org, the BizTalk standard by Microsoft, the Rosetta Net standard by Rosetta Net.org, and EDI X12 832. More generally, the tagged fields may be consistent with any published or private standards.

Referring to FIG. 1, the entity which sent a document to the system 100 is an electronic trading partner of the entity to which the user 150 belongs. The relationship of trading partners is illustrated in FIG. 3. The trading partners participate in a trading network 300. This network may be hosted by a single entity or it may be a collaboration of networks hosted by distinct entities. The trading partners may both use the same host or they may use different hosts which route messages among themselves. Two trading partners 360, 380 are illustrated. Participants on behalf of the trading partners 361, 381 may be systems or human beings. Referring again to FIG. 1, the entity 100 which sends the document to the system 105 may be either a system or human being. Purchasing systems are examples of entities which generate tagged field documents and send them to systems. Purchasing agents are examples of entities which can generate tagged field documents and send them to systems and are able to view formatted documents received by a system.

On the server 110 of FIG. 1, one or more services 112 may be available. The service 112 handling the document sent by entity 100 will persistently store the incoming document. It also may notify a user and that the document has been received. A database 116 may be used to control persistent storage. An electronic commerce database may include a repository of schemas for standard and entity defined business documents, a repository of Java beans, C structures, Pascal records or scripts useful to electronic commerce, the document map repository for translation of documents from one format to another (e.g., the xCBL to an export format) and for transformation of documents from one type to another (e.g., from a purchase order to a shipping confirmation.) The electronic commerce database may further include repositories for report layouts and presentation layouts. A trading partner directory is also useful. The trading partner directory may, as described above, identify URLs to which the sending entity 100 transmits documents. Persistent document storage 114 may be on the same disk storage unit as the database repositories 116 or may be a different unit. Persistent document storage 114 need not be part of a database. An indexed flat file would suffice to store XML-compliant documents. The service 112 which receives the incoming document will index one or more of the tagged fields and store the document. Indexing may be accomplished by the service or by a database system managing the persistent storage 114, or by any other subsystem. The service 112 also will notify the user 150 of receipt of the document. The document may or may not be validated against a schema stored in the database 116 before it is stored. A schema stored in the database 116 may be used to interpret the document. One or more Java beans or scripts stored in the database 116 may be used to act upon the document before it is stored.

One schema for persistently storing documents is illustrated by FIG. 4. In this schema, the document and its header are captured in structure 420. Document attachments are captured in structure 440. Limited sets of document type and status are maintained in structures 410 and 430, respectively. The one to many connections between structures 410 and 430, on one hand, and 420, the other hand, indicate that this schema contemplates that a document will have only one type and only one status. Other arrangements may equally well practice aspects of the present invention.

The service 112 may give notice to the user 150 of receipt of the document by messaging, posting or any other practical means. One or more users may be given notice, based on the identity of the sending entity, the identity of the receiving entity or the document type. One syntax for subscription by a user is Subscription=sender ID.recipient ID.document type. To receive all Order documents from a particular sending entity, a user could subscribe as follows: Subscription=S1234.*.Order. This subscription would cause the service 112 to notify the user 150 of receipt of order type documents from sending entity S1234. Security features of a system would, of course, restrict access by the user 150 those receiving entities for which the user was authorized. Notice may be given by messaging, such as e-mail or a Lotus Notes messaging protocol. A message may include a subject, such as, “Five new documents received,” header text generally stating that new documents have been received or that old documents remain to be viewed. The e-mail may further include body text providing the date, number and sending parties' identities for documents received. The body text may further provide detail regarding individual documents received, such as the document type, sender identity and date or time of receipt. A footer may identify the location for viewing the document, such as by a click through URL. Alternatively, notice may be given by posting at a location to which the user has access. A combination of the two may be used, such as posting to location from which e-mail notices are generated if the user does not promptly access the list. E-mails based on the status of accessing a posted notice may be sent periodically and may include increasingly strong wording or additional addressees, based on the type and/or aging of the received document.

In interface by which the user may access a stored document is illustrated in FIG. 5. The particular interface used is not important to the present invention. This interface is based on a standard file explorer. Documents of a particular type, for instance a purchase order, are indicated by a folder 510 in the user's in box. Individual documents are identified by some type of identifier 530 and by any other attributes 540. Tools 520 may be provided for sorting and searching through documents, either within or among document types. Useful fields for sorting and searching may include document type, marketplace identity for the electronic commerce marketplace from which the document originated, portal ID for further identification when a marketplace is hosted by more than one portal, sender ID for the trading partner that sent the document, receiver ID for the trading partner to whom the document is addressed, status of reviewing the document, status of reviewing the document attachments, and date/time stamps for when a document was sent and when it was received. The review statuses may include read, not read or marked. A document which has been read may be marked “not read” by the user. Global trading partners or users may identify additional statuses. These useful fields also may be used to control the formatting of the document for display to the user, as explained below.

The processing of user requests to view a document can be understood by referring again to FIG. 1. A user interface application 120 may include a web server 122, a data storage interface 124, and in box 126, one or more services to read the document and its attachments 127 and to search and list received documents 128. The web server 150 may include Microsoft's WebServer software, a Java interpreter such as JRun 2.3.3 and a servelet container. The data storage interface 124 may use resources of the database 116. The service for reading received documents and attachments 127 may utilize a presentation layout repository maintained in the database 116 to format documents persistently stored 114. The service for searching and listing documents 128 may access a report layout repository in the database 116 for displaying either indexed or non-indexed tagged fields persistently stored 114. The service 127 is illustrated as being coupled with a transformation engine 140. This transformation engine may include selection logic 144 to select a tagged fields format for display sheet, which is applied to a particular document, and transformation logic 142, which applies a tagged fields format for display sheet to a particular document and produces a formatted version of the document. The selection logic 144 may access a document map repository, a report layout repository and a presentation layout repository stored in the database 116. The transformation logic 142 also may access presentation layouts stored the database 116.

One aspect of the present invention is the selection logic 144 to select a tagged fields format for display sheet to apply to a particular document. As a shorthand, a tagged fields format for display sheet may be referred to as a stylesheet. A stylesheet can be applied to format a document for manual viewing either one it is received or in response to a user request. Formatting a document when it is received requires automatic selection of tagged fields format for display sheet and storage of the transformed document, as well as original document. The transformed document can take a form of an HTML document, PostScript document, and an ASCII document or any other view will format. The transformed document can be stored the same persistent storage 114 as the original document or in other storage. Alternatively, formatting can be applied for manual viewing in response to user request. In this case, selection of a tagged fields format for display sheet can be automatic or can present a tailored list of choices to user for user selection.

Automatic selection of style sheets may be supported by the system of default in progressively more customized style sheets. A hierarchical, rule based selection may be used. For instance, one or more default style sheets may be provided at level 0. Alternative style sheets of level 0 may be distinguished based on the amount of data received in an incoming document. For instance, style sheets may be provided for incoming documents smaller and larger than 25,600 bytes. Style sheets at level below 0 may be customized based on a number of attributes associated with a document. The attributes may include document type, marketplace identity for the marketplace from which the document originated, portal identity for further identification when a marketplace is hosted by more than one portal, sender identity for the trading partner that sent the document, receiver ID for the trading partner and to whom the document is addressed, and status of reviewing the document or its attachments. A further attribute which may be useful in selecting a stylesheet is an identifier for the schema used to understand the types of tagged fields appearing in the document, if the tagged fields are compliant with a schema. One hierarchy of levels which can be used to select a stylesheet is:

0=default

1=document type

2=document type+marketplace identity of document origination

3=document type+sender identity

4=document type+sender identity+receiver identity

5=schema used+document type+marketplace identity of document origination+portal identity

6=schema used+document type+marketplace identity of document origination+sender identity

7=schema used+document type+marketplace identity of document origination+receiver identity

8=schema used+document type+sender identity+receiver identity+marketplace identity of document origination

A stylesheet can be selected using a tagged field of the document or a property associated with the document or user. A user can combine tagged field and property information in any way to create a stylesheet selection rule. Selection logic can, for example, load all of the default and user created rules and apply them at runtime, substituting values of tagged fields and properties for keywords appearing in rules. Alternative decision rules can be applied. For instance, a stylesheet may be selected on the basis of which rule level it satisfies, selecting the stylesheet which is most customized to the substituted values. Applying this procedure, style sheets could be stored in the database or a simple directory tree. The directory tree might be structured as follows:

0=root/default.xsl

1=root/purchase order/default.xsl

2=root/purchase order/MP1/default.xsl

3=root/purchase order/TPS1/default.xsl

4=root/purchase order/TPS1/TPR2/default.xsl, etc.

Applying the directory tree structure such as this, the selection logic could construct directory paths and test to determine whether a tagged field format for display sheet exists in each of the constructed paths. Alternatively, rules could be selected on the basis that the rule with the most matches wins. The following table may reside be used to track style sheets:

ID DocType Market-place Sender Receiver StyleSheet 0 * Default.xsl 1 PurchaseOrder PurchaseOrder.xsl 2 PurchaseOrder OfficeD OfficeDPO.xsl 3 PurchaseOrder OfficeD OfficeDPO.xsl 4 PurchaseOrder Boeing BoeingPO.xsl 5 PurchaseOrder Boeing GE Aero BoeingGEAeroPO.xsl 6 PizzaDelivery PizzaHut PizzaHutPizza.xsl 7 PizzaDelivery Dominos DominosPizza.xsl 8 PizzaDelivery Pizza.xsl 9 PizzaDelivery Chicago ChicagoPizza.xsl 10 PizzaDelivery NewYork NewYorkPizza.xsl 11 PizzaDelivery NewYork PizzaHut PizzaHutNYPizza.xsl

The selection logic can query the table based on the DocumentType and iterate through the result list. As it iterates through the result list, it will can rank each of the result list that qualified. A record that does not qualify will be dropped from the ranking list. The record with the highest ranking number will be the one get selected. For instance, for a PO document was sent to XYZ from ABC. The selector will have the following result list:

Rule ID # Ranking # Why 1 1 Matches the PurchaseOrder doc type 0 0 Matches the default doc type

Applying this approach, the selection logic would select Rule ID # 1 since it has higher ranking. In another instance, consider a Pizza Document was sent by PizzaHut in a NewYork GMP. The selector will have the following result list:

Rule ID # Ranking # Why 11 3 Matches the Pizza + marketplace + Sender 10 2 Matches the Pizza + marketplace 8 1 Matches Pizza default doc type 0 0 Matches the default doc type

The selection logic would select Rule ID #11 since it has the high-ranking. The selection system need not be hierarchical in order to supply default in alternative rules. Combinations of tagged field values and document properties may be used in any way practical to select an applicable stylesheet or the best applicable stylesheet.

An individual user selects or is assigned to a locale. A locale is a more general concept than a language, because the same language (e.g., English) can be spoken in distinctly different ways (e.g., British and American English). Data received from trading partner may be transformed for display based on the locale or language of the user. One aspect of the present invention is that selection of one from a plurality of tagged field format for display sheets may correspond to localization of the display to match the language or locale of the user. Organization and locale can be combined to select a tagged field format for display sheet; they may be combined with the content of one or more tagged fields or properties of the document. A particular tagged field format for display sheet or one or more modules supporting that particular sheet can be stored on disk or remote storage until needed. One aspect of the present invention is loading the selected tagged field format for display sheet or modules supporting it from disk or remote storage after selecting it.

FIGS. 7-11 and the following code illustrate one transformation of a document for display to a user. One aspect of this particular transformation is that tagged fields conform to a schema and tagged fields of unrecognized types have recognized supertypes. In this sense, the recognized supertype may be a parent, grandparent or other ancestor of the unrecognized type. This particular transformation accepts fields of unrecognized types and formats them based on recognized supertypes of the unrecognized types. Alternatively, the transformation logic could evaluate the contents of a tagged field and apply a general format consistent with those contents.

FIG. 7 illustrates a received document. This example is a purchase order compliant with XML and supported by a xCBL schema, displayed using Internet Explorer. The order header 701 of this purchase order includes several tagged fields: purchase order issued date, requested delivery date and ship by date. The “-” 702 depicts a feature of Internet Explorer's XML viewing capability which allows the user to collapse for expand structured XML data for viewing. FIG. 8 illustrates transformation of this XML format for viewing by a user. The transformed data is compliant with the browser. In this instance, the browser is Internet Explorer. Any other browser may be used. The transformed data this instance also is HTML compliant. Accordingly, in HTML viewer could be used to view the transformed data. The order header 801 is format and to be readable. A more elaborate formatting might converted date field into the user friendly string “Dec. 12, 1999 at 18:20:12 PST”. Field identifiers preferably use chosen names instead of tag values of the tagged fields. When localization is applied, the chosen names may be appropriate to the language and dialect of the user. In a localized style sheet, “Compra Orden” might appear as a field identifier instead of “PurchaseOrder”.

Many aspects of the present invention are further illustrated in the following code. This code includes a hierarchy of included files for a default stylesheet, as follows:

default.xsl   default0_0.xsl     defConf.xsl       default.js (JavaScript)     elemProc.xsl       elemConf.xsl   attrProc.xsl     attrConf.xsl

FIG. 9 is a summary of the source code for translation from XML to HTML. This code translates tagged fields in a document into a form compatible with an HTML viewer and with the Internet Explorer and Netscape Communicator browsers. The principal modules of this default stylesheet are default.xsl 901, default0.xsl 902, elemProc.xsl 903, and attrProc.xsl 905. The module elemProc may be invoked mutiple times for multiple elements or tagged fields.

The default stylesheet further includes a feature to allow outlining features of collapsing and revealing detail. FIG. 10 illustrates this feature. The Order Header 1001 remains uncollapsed, as in FIG. 8. The Order Reference 1002 is collapsed from its appearance in FIG. 8. This formatting may be accomplished by an HTML to HTML transformation. The HTML to HTML transformation is supported by a JavaScript, default.js. FIG. 11 is a high level design flow for transforming HTML to an HTML tree view. The steps or modules for this transformation are 1101 through 1107. The JavaScript remains active, responding to mouse clicks or other user actions which expand or collapse portions of the tree view.

Those of skill in the relevant arts will find the code in the accompanying source code appendix, which is incorporated by reference, to be instructive in carrying out aspects of the invention which have been presented more generally.

The methods illustrated above can be extended by services beyond viewing a document. A document which can be read also can be printed. Print formats can be selected by rules, using the most specific format available: if a print format is available for a combination of trading partner and document type, use that format; if a print format is available for a document type, use that format; if a base format is available for a portal war receiving party, use that format; and, in all cases, a default print format is available to use.

A document map repository may support a copying service, to transform a document from one document to another or from one type of document to another. A new document can be prepared using old documents template, by copying the old document and editing it. A new type of document can be prepared from an old document using document mapping supported by a schema. Static maps may be stored in the database 116 which map tagged fields from one document type to another document type. Copy functionality may, for instance, translate a purchase order into an acceptance or shipping confirmation.

Reply functionality may be supported as a variation on copy functionality, with addressing added. A simple reply may include an unedited version of the document received. A more elaborate reply may permit a user to edit the document received before responding. It may or may not track the changes made. A yet more elaborate reply may provide a user with a variety of transformations which are standard in replying to a particular type of document.

Export functionality may be provided to map one document type to another for editing outside the system. A simple export also may be provided for transforming a document into a tax or were processor format.

Type and send functionality may be provided from either templates of documents used by an organization or from a copy or transformation of a document selected by the user. Preferably, a JavaScript module is provided to update the values of tagged fields based on edits made by the user at the browser. The JavaScript technology described above is readily adapted to carry out this action. An editing functionality may be extended by a verification function, which would take codes entered by the user and verify that they translate into valid addressees, etc., or it could for simply display the translation of the codes. An editing function may be further extended with pull-down selection menus for addresses, using either a dictionary or a list of recently used values.

Corollary to a template facility is a draft document facility. The interface in FIG. 5 depicts now drafts might be stored for later use. A user could create and store in HTML form based on a Sox schema. They could create a document, such as a SOX instance, from an HTML form. They could edit the SOX instance, add attachments, and store the entity created. The user could import material for the entity created from other sources and, eventually, send the draft. An out box could support sending documents and a send box could store copies of documents have been sent.

FIG. 6 depicts one improvement to the XSLT programming language standard. In XSLT, an “href” type is provided to store a string which is written into the code to specify a universal resource identifier (URI). The URI assigned to the href cannot be changed when or after the XSLT style sheet is invoked. In other words, the URI is static. One aspect of the present invention is an improved method of referring to an XSLT style sheet or module referenced by the URI, including defining a variable type holding a string corresponding to a URI, assigning to a variable of the defined type a string corresponding to a URI; referencing an XSLT style sheet or module based on the variable, and applying the referenced XSLT style sheet or module to the document to generate an output. In FIG. 6, a URI value 601 is assigned to a variable 602 which is then used to reference an XSLT style sheet or module.

Another improvement to the XSLT programming language is conditional loading of modules of an XSLT style sheet. This improvement includes defining a conditional syntax for including an XSLT module from disk in an XSLT style sheet, parsing the XSLT style sheet utilizing the conditional syntax, determining whether a condition specified in the conditional syntax succeeds or fails, and loading the XSLT module from disk if the condition succeeds. This is distinct from and in addition to the selection of a stylesheet described above.

A variable containing a URI value can be used in conjunction with the system in FIG. 1. In connection with selecting one of a plurality of tagged fields format for display sheets, the sheets may be referenced by URIs and selecting the sheet may include dynamically constructing a URI to reference the selected tagged fields for display sheet. Alternatively, a URI corresponding to the selected tagged fields for display sheet may be assigned to a variable and variable subsequently used to reference the sheet. This approach is well adapted to localization of displays. A user locale may be associated with the user and a plurality of tagged fields format for display sheets may correspond to a plurality of locales. The sheets may be referenced by URI strings in a variable defined to receive a particular URI corresponding to the user's locale. Then, selecting a particular sheet include assigning a particular URI string to the variable based on the user locale.

Many combinations of features discussed above can be combined in useful combinations. Some of the useful combinations are set forth in the claims below.

While the preceding examples are cast in terms of a method, devices and systems employing this method are easily understood. A magnetic memory containing a program capable of practicing the claimed method is one such device. A computer system having memory loaded with a program practicing the claimed method is another such device.

While the present invention is disclosed by reference to the preferred embodiments and examples detailed above, it is understood that these examples are intended in an illustrative rather than in a limiting sense. It is contemplated that modifications and combinations will readily occur to those skilled in the art, which modifications and combinations will be within the spirit of the invention and the scope of the following claims. 

1. An improved method of referring to a module from within an XSLT style sheet, the module identified by a URI, including: defining in an XSLT style sheet a variable type holding a string corresponding to a URI; assigning to a variable of the defined type a string corresponding to a URI; referencing a module based on the variable; and applying the referenced module to generate an output.
 2. An improved method of controlling the loading of modules of an XSLT style, including: defining a conditional syntax for including a segment of XSLT code from disk in an XSLT style sheet; parsing the XSLT style sheet utilizing the conditional syntax; determining whether a condition specified in the conditional syntax succeeds or fails; and loading the segment XSLT code from disk if the condition succeeds. 